package permission

import (
	"github.com/ifnk/micro-blog/internal/pkg/dbcontext"
	"github.com/ifnk/micro-blog/internal/pkg/log"
	"github.com/ifnk/micro-blog/protobuf/permission_pb"
)

func NewMenuServer(logger *log.Logger, db *dbcontext.GormDB, jinzhuDB *dbcontext.JinZhuDB) MenuServer {
	return MenuServer{
		logger:                   logger,
		db:                       db,
		MenuServiceDefaultServer: permission_pb.MenuServiceDefaultServer{DB: jinzhuDB.DB},
	}
}

type MenuServer struct {
	permission_pb.MenuServiceDefaultServer
	logger *log.Logger
	db     *dbcontext.GormDB
}
